package com.lifeng.patterns.chainofResponsibility;

/**
 * @description:
 * @author: lifeng
 * @create: 2020/9/10 17:29
 */
public class ApprovalClient {
    public static void main(String[] args) {
        /*//部门经理
        AbstractApprovaHandler dept = new DeptManagerApprovaHandler();
        //项目经理
        AbstractApprovaHandler project = new ProjectManagerApprovaHandler(dept);
        System.out.println(project.submit(600));*/

        //大boss
        AbstractApprovaHandler boss = new BossManagerApprovaHandler();
        //部门经理
        AbstractApprovaHandler dept = new DeptManagerApprovaHandler(boss);
        //项目经理
        AbstractApprovaHandler project = new ProjectManagerApprovaHandler(dept);
        System.out.println(project.submit(1200));
    }
}
